﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.pp.processor.type.comm;
using SharpSqlAnalyzer.pp.utils;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.pp.processor.type.update
{
	// Token: 0x0200022D RID: 557
	public class UpdateKeyWordAlignProcessor : AbstractKeyWordAlignProcessor
	{
		// Token: 0x060012C2 RID: 4802 RVA: 0x00319FD8 File Offset: 0x003181D8
		protected internal override IList<TSourceToken[]> getTSourceToken<E>(E arg)
		{
			TUpdateSqlStatement tupdateSqlStatement = arg as TUpdateSqlStatement;
			IList<TSourceToken[]> list = new List<TSourceToken[]>();
			TSourceToken updateToken = tupdateSqlStatement.UpdateToken;
			if (updateToken != null)
			{
				list.Add(new TSourceToken[]
				{
					updateToken
				});
			}
			TSourceToken tsourceToken = SourceTokenSearcher.backforwardSearch(tupdateSqlStatement.ResultColumnList.startToken, 5, "set");
			if (tsourceToken != null)
			{
				list.Add(new TSourceToken[]
				{
					tsourceToken
				});
			}
			if (tupdateSqlStatement.WhereClause != null && tupdateSqlStatement.WhereClause.startToken != null)
			{
				list.Add(new TSourceToken[]
				{
					tupdateSqlStatement.WhereClause.startToken
				});
			}
			return list;
		}
	}
}
